package edu.sctu.practice.class02.luohui.test02;
/**
 * Created by asus on 2015/10/13.
 */
public class Vehicle {
    int speed ;
    int size;
    public Vehicle(int speed, int size) {
        this.speed = speed;
        this.size = size;
        System.out.println("最初的速度是："+speed+"，体积是："+size);
    }
    public void setSpeed(int speed){
      this.speed=speed;
        System.out.println("建立速度！");
    }
    public void speedUp(){
        speed*=2;
        System.out.println("加速！");
    }
    public void speedDown(){
        speed-=5;
        System.out.println("减速！");
    }
    public void move(){

        System.out.println("从此速度开始变化："+speed);
    }

}
